package com.tis.database.entitys.promis;

import java.io.Serializable;

import javax.persistence.*;

import com.tis.database.dao.ClsInstance;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the CUSTOMER_CREDIT_NOTES database table.
 * 
 */
@Entity
@Table(name=ClsInstance.PROMIS_SCHEMA + ClsInstance.POINTER + "CUSTOMER_CREDIT_NOTES")
@NamedQueries({
	@NamedQuery(name=CustomerCreditNote.findAll, query="FROM CustomerCreditNote c"),
	@NamedQuery(name=CustomerCreditNote.findByIs, query="FROM CustomerCreditNote c Where c.status IN(:status) And c.syncIsstaging = :syncIsstaging And c.syncIssync =:syncIssync  ")
})
public class CustomerCreditNote implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Transient public static final String findAll = "CustomerCreditNote_findAll";
	@Transient public static final String findByIs = "CustomerCreditNote_findByIs";

	@EmbeddedId
	private CustomerCreditNotePK id;

	@Column(name="ADDRESS_CODE")
	private BigDecimal addressCode;

	@Column(name="BUILDING_PHASE_CODE")
	private String buildingPhaseCode;

	@Column(name="CREATED_BY")
	private String createdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREDIT_NOTE_DATE")
	private Date creditNoteDate;

	private String currency;

	@Column(name="CUSTOMER_CODE")
	private String customerCode;

	@Column(name="CUSTOMER_NAME")
	private String customerName;

	@Column(name="DEPARTMENT_CODE")
	private String departmentCode;

	@Column(name="EXCHANGE_RATE")
	private BigDecimal exchangeRate;

	@Column(name="FLAG_CANCEL_INV")
	private String flagCancelInv;

	@Column(name="INVOICE_CREDIT_AMOUNT")
	private BigDecimal invoiceCreditAmount;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="LINK_FILE_ID")
	private BigDecimal linkFileId;

	@Column(name="NET_CREDIT_AMOUNT")
	private BigDecimal netCreditAmount;

	@Column(name="NET_CREDIT_LOCAL")
	private BigDecimal netCreditLocal;

	private String project;

	@Column(name="PROPERTY_TYPE_CODE")
	private String propertyTypeCode;

	private String remarks;

	private String status;

	@Column(name="SYNC_CREATEDBY")
	private String syncCreatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY")
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO")
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING")
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC")
	private String syncIssync;

	@Column(name="SYNC_PK_ID")
	private String syncPkId;

	@Column(name="SYNC_UPDATEDBY")
	private String syncUpdatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="UNADJUSTED_CREDIT_AMOUNT")
	private BigDecimal unadjustedCreditAmount;

	@Column(name="VAT_CODE")
	private String vatCode;

	@Column(name="VAT_CREDIT_AMOUNT")
	private BigDecimal vatCreditAmount;
	
	@Column(name="IS_RESEND")
	private String isResend;
	
	@Column(name="RESEND_COUNT")
	private int resendCount;

	/**
	 * @return the isResend
	 * Date =Nov 1, 2013 : 6:01:47 PM 
	 * CreateBy=Chatree Siangklom
	 * CustomerCreditNote.java String
	 * TODO
	 */
	public String getIsResend() {
		return isResend;
	}

	/**
	 * @param isResend the isResend to set
	 * Date =Nov 1, 2013 : 6:01:47 PM 
	 * CreateBy=Chatree Siangklom
	 *  CustomerCreditNote.java String
	 * TODO
	 */
	public void setIsResend(String isResend) {
		this.isResend = isResend;
	}

	/**
	 * @return the resendCount
	 * Date =Nov 1, 2013 : 6:01:47 PM 
	 * CreateBy=Chatree Siangklom
	 * CustomerCreditNote.java int
	 * TODO
	 */
	public int getResendCount() {
		return resendCount;
	}

	/**
	 * @param resendCount the resendCount to set
	 * Date =Nov 1, 2013 : 6:01:47 PM 
	 * CreateBy=Chatree Siangklom
	 *  CustomerCreditNote.java int
	 * TODO
	 */
	public void setResendCount(int resendCount) {
		this.resendCount = resendCount;
	}

	public CustomerCreditNote() {
	}

	public CustomerCreditNotePK getId() {
		return this.id;
	}

	public void setId(CustomerCreditNotePK id) {
		this.id = id;
	}

	public BigDecimal getAddressCode() {
		return this.addressCode;
	}

	public void setAddressCode(BigDecimal addressCode) {
		this.addressCode = addressCode;
	}

	public String getBuildingPhaseCode() {
		return this.buildingPhaseCode;
	}

	public void setBuildingPhaseCode(String buildingPhaseCode) {
		this.buildingPhaseCode = buildingPhaseCode;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public Date getCreditNoteDate() {
		return this.creditNoteDate;
	}

	public void setCreditNoteDate(Date creditNoteDate) {
		this.creditNoteDate = creditNoteDate;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getCustomerCode() {
		return this.customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getCustomerName() {
		return this.customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getDepartmentCode() {
		return this.departmentCode;
	}

	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}

	public BigDecimal getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(BigDecimal exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public String getFlagCancelInv() {
		return this.flagCancelInv;
	}

	public void setFlagCancelInv(String flagCancelInv) {
		this.flagCancelInv = flagCancelInv;
	}

	public BigDecimal getInvoiceCreditAmount() {
		return this.invoiceCreditAmount;
	}

	public void setInvoiceCreditAmount(BigDecimal invoiceCreditAmount) {
		this.invoiceCreditAmount = invoiceCreditAmount;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getLinkFileId() {
		return this.linkFileId;
	}

	public void setLinkFileId(BigDecimal linkFileId) {
		this.linkFileId = linkFileId;
	}

	public BigDecimal getNetCreditAmount() {
		return this.netCreditAmount;
	}

	public void setNetCreditAmount(BigDecimal netCreditAmount) {
		this.netCreditAmount = netCreditAmount;
	}

	public BigDecimal getNetCreditLocal() {
		return this.netCreditLocal;
	}

	public void setNetCreditLocal(BigDecimal netCreditLocal) {
		this.netCreditLocal = netCreditLocal;
	}

	public String getProject() {
		return this.project;
	}

	public void setProject(String project) {
		this.project = project;
	}

	public String getPropertyTypeCode() {
		return this.propertyTypeCode;
	}

	public void setPropertyTypeCode(String propertyTypeCode) {
		this.propertyTypeCode = propertyTypeCode;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncPkId() {
		return this.syncPkId;
	}

	public void setSyncPkId(String syncPkId) {
		this.syncPkId = syncPkId;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public BigDecimal getUnadjustedCreditAmount() {
		return this.unadjustedCreditAmount;
	}

	public void setUnadjustedCreditAmount(BigDecimal unadjustedCreditAmount) {
		this.unadjustedCreditAmount = unadjustedCreditAmount;
	}

	public String getVatCode() {
		return this.vatCode;
	}

	public void setVatCode(String vatCode) {
		this.vatCode = vatCode;
	}

	public BigDecimal getVatCreditAmount() {
		return this.vatCreditAmount;
	}

	public void setVatCreditAmount(BigDecimal vatCreditAmount) {
		this.vatCreditAmount = vatCreditAmount;
	}

}